import React, {
    Component,
} from 'react';

import {
    Text,
    View,
    TouchableWithoutFeedback,
} from 'react-native';

import CXIcon from "../../components/cxicon/CXIcon";

import styles from "./css/mine";

export default class extends Component {

    static navigationOptions = ({ navigation }) => {
        return {
            title: '我的',
            tabBarIcon: ({focused, tintColor})=>(
                <CXIcon name="mine_tab" size={22} color={tintColor} />
            ),
        };
    }

    render() {
        return (
            <View style={styles.container}>
                <View style={styles.block}>
                    <View style={styles.item}>
                        <View style={styles.icon_block}>
                            <CXIcon name='help' size={20} color='#0fa0e3' style={styles.icon}></CXIcon>
                        </View>
                        <Text style={styles.label}>帮助</Text>
                    </View>
                    <TouchableWithoutFeedback
                        onPress={() => this.props.navigation.navigate('Settings', {transition: 'slide'})}
                    >
                        <View style={styles.item}>
                            <View style={styles.icon_block}>
                                <CXIcon name='settings' size={20} color='#7884d6' style={styles.icon}></CXIcon>
                            </View>
                            <Text style={styles.label}>设置</Text>
                        </View>
                    </TouchableWithoutFeedback>
                </View>
            </View>
        )
    }
}